package cn.cdqf.service.impl;

import cn.cdqf.bean.TMajor;
import cn.cdqf.mapper.MajorMapper;
import cn.cdqf.service.MajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MajorServiceImpl implements MajorService {

    @Autowired
    private MajorMapper majorMapper;

    @Override
    public List<TMajor> getMajors() {
        return majorMapper.getMajors();
    }

    @Override
    public List<TMajor> queryMajors() {
        return majorMapper.queryMajors();
    }

    @Override
    public int deleteMajors(int id) {
        return majorMapper.deleteMajors(id);
    }

    @Override
    public TMajor queryMajorById(int id) {
        return majorMapper.queryMajorById(id);
    }

    @Override
    public int updateMajor(TMajor tMajor,int id) {
        return majorMapper.updateMajor(tMajor,id);
    }

    @Override
    public int addMajor(TMajor tMajor) {
        return majorMapper.addMajor(tMajor);
    }

    @Override
    public List<TMajor> getMajorName() {
        return majorMapper.getMajorName();
    }
}
